package com.aaa.controller.fpa;

import com.aaa.controller.BaseController;
import com.aaa.entity.PageSortEntity;
import com.aaa.entity.Result;
import com.aaa.entity.fpa.ViewTestResultFpa;
import com.aaa.service.fpa.ViewTestResultFpaService;
import com.github.pagehelper.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：chenang（731712841@qq.com）
 * @date ：Created in 2022/9/5 14:34
 * @description：视图 view_test_result_fpa
 * @modified By：
 * @version:
 */
@RestController
@RequestMapping("/viewTestResultFpa")
public class ViewTestResultFpaController extends BaseController {
    @Autowired
    ViewTestResultFpaService viewTestResultFpaService;
    /**
     * 分页查询
     */
    @RequestMapping("viewTestResultFpaAll.do")
    public Result viewTestResultFpaAll(PageSortEntity pageSortEntity , ViewTestResultFpa viewTestResultFpa){
        Page page = viewTestResultFpaService.queryByPage(viewTestResultFpa, pageSortEntity);
            return success(page.getResult(), page.getTotal());
    }
    @RequestMapping("delviewTestResultFpa.do")
    public Result delviewTestResultFpa(int[] id  ) {
        int i = viewTestResultFpaService.delViewTestResultFpa(id);
        if(i>0){
            return success("删除成功");
        }else {
            return success("删除失败");
        }
    }
}
